<?php
defined ( 'IN_ADMIN' ) or exit ( 'No permission resources.' );
$show_dialog = 1;
include $this->admin_tpl ( 'header', 'admin' );
?>
<form method="post" name="frmlist" action="">
	<div class="table-list">
		<table width="100%" cellspacing="0">
			<thead>
				<tr>
					<th align="left" colspan="6">
						聚天使众筹信息管理 | 
						<a href="/index.php?m=hchbrowse&c=main&a=myadd">
							<em>新增聚天使众筹信息</em>
						</a>
					</th>
				</tr>
				<tr>
					<th width="30" align="center">&nbsp; </th>
					<th align="center">名称</th>
					<th align="center">标题</th>
					<th align="center">内容摘要</th>
					<th align="center">状态</th>
					<th align="center">管理操作</th>
				</tr>
			</thead>
			<?php
			if (is_array ( $lists ) && count ( $lists ) > 0) {
				foreach ($lists as $item){
			?>
          	<tr>
				<td align="center" width="35"><input type="checkbox" name="id[]"
					value="<?php echo $item['id']?>"></td>
				<td align="center" width="15%"><?php echo $item['name']?></a></td>
				<td align="center" width="15%"><?php echo $item['title']?></td>
				<td align="left"><?php echo $item['short_content'];?></td>
				<td align="center" width="10%">
                    <?php if($item['is_close']==1 && $item['is_show']==1){ ?>
                        <span style="color:red;">申请关闭</span>
                    <?php }elseif($item['is_close']==1 && $item['is_show']==0){ ?>
                        <span style="color:#808080;">已关闭</span>
                    <?php }?>
                </td>
				<td align="center"  width="10%">
					<a href="/index.php?m=hchbrowse&c=crud&a=mylist&browse_id=<?php echo $item['id'] ?>">管理</a>
					| <a href="/index.php?m=hchbrowse&c=user2crowdfunding&a=mylist&crowdfunding_id=<?php echo $item['id'] ?>">众筹用户管理</a>
					| <a href='/index.php?m=hchbrowse&c=main&a=myedit&id=<?php echo $item['id'] ?>'>编辑</a>
					| <?php if($item['is_show'] == 0 && $item['is_close'] == 0){ ?>
					<a href='/index.php?m=hchbrowse&c=main&a=mycheckone&id=<?php echo $item['id'] ?>' onclick="return confirm('确认审核通过吗？')">审核</a>
					<?php }else{?>
						<label style="color:#ccc;">审核</label>
					<?php }?>
					| <a href="/index.php?m=hchbrowse&c=main&a=myview&id=<?php echo $item['id'] ?>">查看</a>
                    | <?php if($item['is_show'] == 1 && $item['is_close'] == 1){ ?>
                        <a href='/index.php?m=hchbrowse&c=main&a=close_project&id=<?php echo $item['id'] ?>' onclick="return confirm('确认关闭吗？')">关闭</a>
                    <?php }else{ ?>
                        <label style="color:#ccc;">关闭</label>
                    <?php }?>
					| <a href="/index.php?m=hchbrowse&c=main&a=mydelone&id=<?php echo $item['id'] ?>" onclick="return confirm('确认删除记录吗？')">删除</a>
				</td>
			</tr>
			<?php
				}	
			}else{
			?>
			<tr>
				<td align="center"colspan="5">没有查询到数据。</td>
			</tr>
			<?php }?>
			<tr>
				<td colspan="10">
					<input type="submit" class="button"	name="submitdel" onClick="doCheck()" value="审核" />
					<input type="submit" class="button"	name="submitdel" onClick="doDel()" value="删除" />
				</td>
			</tr>
			</tbody>
		</table>
	</div>
	<div id="pages"><?php echo $pages ?></div>
</form>
</body>
<script type="text/javascript">
function doDel(){
	if(confirm('确认删除记录吗？')){
		document.frmlist.action='/index.php?m=hchbrowse&c=main&a=mydel';
		submitchk.submit();
	}
}
function doCheck(){
	if(confirm('确认选择记录全部审核通过吗？')){
		document.frmlist.action='/index.php?m=hchbrowse&c=main&a=myCheck';
		submitchk.submit();
	}
}
</script>
</html>